<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="haha"></div>
</body>
<script>
     
     let s=Number(prompt("请输入秒数："))
     function getTime(t)
     {
        h=parseInt(t/60/60%24);
        m=parseInt(t/60%60)
        s=parseInt(t%60)
        h=h<10? '0'+h:h;
        m=m<10? '0'+m:m;
        s=s<10? '0'+s:s;
        return "转换完之后是"+h+"小时"+m+"分"+s+"秒"
        
    }
     let str1=getTime(s);
    document.write(str);
    let str=["img/1.jpeg","img/2.jpg","img/3g.jpg","img/4.jpg"];
     let i=0;
     function change(){
        document.getElementById("haha").innerHTML.str[i];
        i++;
        if(i>2){
            i=0;
        }
        let t=setTimeout("change()",3000);
     }
     change();
</script>
</html>